<template>
  <div>
    <el-menu
      router
      :default-active="$route.path"
      class="el-menu-demo"
      mode="horizontal"
      style="width: 97%; margin-left: 20px; border-radius: 10px"
    >
      <el-menu-item index="/home/order/order1">已出行订单</el-menu-item>
      <el-menu-item index="/home/order/order2">未出行订单</el-menu-item>
    </el-menu>
    
      <!-- 二级路由 动态设置内容 -->
      <router-view />
    
    <!-- <el-table
      :data="tableData"
      style="width: 97%; margin-left: 20px; border-radius: 10px;"
      
    >
      <el-table-column prop="oid" label="订单编号"> </el-table-column>
      <el-table-column prop="arrdate" label="入住时间"> </el-table-column>
      <el-table-column prop="leavedate" label="离开时间"> </el-table-column>
      <el-table-column prop="oprice" label="价格"> </el-table-column>
      
    </el-table> -->
  </div>
</template>

<script>
import axios from "axios";
export default {
  data() {
    return {
      tableData: [],
    };
  },
  mounted() {
    this.download();
  },
  methods: {
    download() {
      var url = "http://localhost:3000/order/infor/1";
      axios.get(url).then((res) => {
        console.log(res);
        this.tableData = res.data.data;
      });
    },
  },
};
</script>

<style lang="scss" scoped>
element.style {
  background-color: rgb(245, 245, 245);
}
.el-table,
.el-table__expanded-cell {
  background-color: rgb(245, 245, 245);
  margin-top: 0;
}
</style>